﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MyMES.Domain.zyy;
using MyMES.Error;
using MyMES.Writer.API.Application.Commends.BomOperates;

namespace MyMES.Writer.API.Controllers.BomOperates
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class BomOperateController : ControllerBase
    {
        private readonly IMediator med;

        public BomOperateController(IMediator med)
        {
            this.med = med;
        }
        [HttpPost]
        public async Task<APIResult<BomOperate>> AddBOMBOerate(AddBomOperatecommand request, CancellationToken cancellationToken)
        {
            return await med.Send(request,cancellationToken);
        }
    }
}
